/*
 Navicat Premium Data Transfer

 Source Server         : 阿里云服务器：SQL Server
 Source Server Type    : SQL Server
 Source Server Version : 13005026
 Source Host           : 121.40.101.29:1433
 Source Catalog        : scm_main_sfl_visit_dev
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 13005026
 File Encoding         : 65001

 Date: 21/09/2020 17:17:17
*/


-- ----------------------------
-- Table structure for bd_sys_codeRule
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bd_sys_codeRule]') AND type IN ('U'))
	DROP TABLE [dbo].[bd_sys_codeRule]
GO

CREATE TABLE [dbo].[bd_sys_codeRule] (
  [classId] varchar(20) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [identifyCode] varchar(10) COLLATE Chinese_PRC_CI_AS  NULL,
  [prefix] varchar(10) COLLATE Chinese_PRC_CI_AS  NULL,
  [length] int DEFAULT ((0)) NOT NULL,
  [suffix] varchar(10) COLLATE Chinese_PRC_CI_AS  NULL,
  [fill] varchar(10) COLLATE Chinese_PRC_CI_AS  NULL,
  [codeType] int DEFAULT ((0)) NOT NULL,
  [increment] int DEFAULT ((1)) NOT NULL,
  [remark] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [curDate] varchar(15) COLLATE Chinese_PRC_CI_AS  NULL,
  [curValue] bigint DEFAULT ((0)) NULL
)
GO

ALTER TABLE [dbo].[bd_sys_codeRule] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of [bd_sys_codeRule]
-- ----------------------------
INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'1', NULL, N'60', N'6', NULL, N'0', N'1', N'1', N'部门', N'', N'7')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'10', NULL, N'80', N'6', NULL, N'0', N'2', N'1', N'加班单', N'200831', N'1')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'11', NULL, N'81', N'6', NULL, N'0', N'2', N'1', N'批量补出勤', N'200831', N'1')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'12', NULL, N'10', N'6', NULL, N'0', N'1', N'1', N'系统基础数据', NULL, N'0')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'2', NULL, N'40', N'6', NULL, N'0', N'1', N'1', N'门', N'', N'0')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'205', NULL, N'', N'10', NULL, NULL, N'1', N'1', N'访客单(初始值：10000)', N'', N'10015')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'3', NULL, N'50', N'5', NULL, N'0', N'1', N'1', N'设备', N'', N'0')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'4', NULL, N'70', N'6', NULL, N'0', N'1', N'1', N'班次', N'', N'21')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'5', NULL, N'82', N'6', NULL, N'0', N'2', N'1', N'批量请假单', N'200827', N'3')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'6', NULL, N'10', N'6', NULL, N'0', N'1', N'1', N'班次与部门配置展示表', N'', N'21')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'61', NULL, N'50', N'3', NULL, N'0', N'1', N'1', N'班次类型', N'', N'8')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'79', NULL, N'10', N'3', NULL, N'0', N'1', N'1', N'成本中心', N'', N'6')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'82', NULL, N'T', N'7', NULL, NULL, N'1', N'1', N'访客-虚拟工号', N'', N'6')
GO

INSERT INTO [dbo].[bd_sys_codeRule]  VALUES (N'83', NULL, N'', N'10', NULL, NULL, N'1', N'1', N'访客-虚拟卡号（初始值：2852126720）', N'', N'2852126724')
GO


-- ----------------------------
-- Primary Key structure for table bd_sys_codeRule
-- ----------------------------
ALTER TABLE [dbo].[bd_sys_codeRule] ADD CONSTRAINT [PK_BD_SYS_CODERULE] PRIMARY KEY CLUSTERED ([classId])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

